﻿Public Class f_pop_unidades
    Public c As New Controlador
    Public a As Boolean

    Public numero As Integer
    Private Sub textBox1_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles tb_unidades.KeyPress
        If Char.IsDigit(e.KeyChar) Then
            e.Handled = False
        Else
            e.Handled = True
        End If

    End Sub

    Private Sub b_aceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b_aceptar.Click
        Me.numero = tb_unidades.Text
        tb_unidades.Text = 0

        c.agregar_stock(a)

        Me.Hide()

    End Sub

    Private Sub b_cancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b_cancelar.Click
        Me.Hide()
        tb_unidades.Text = 0

    End Sub

End Class